<?php
/**
 * Created by PhpStorm.
 * User: yhg97p
 * Date: 2016/6/28
 * Time: 17:11
 */
include __DIR__ . '/vendor/autoload.php';

use EasyWeChat\Foundation\Application;

$options = [
    'debug' => true,
    'app_id' => 'wxb0c815afa200ac50',
    'secret' => '723078792089da0955473e72ce0a65a3',
    'token' => 'w0Q52Arls2S9T2qlsRA215q09q2L9R2z',
    'aes_key' => 'BIZj50Eerqqj55fL5d80udIuzEiLQ5eLrfl5wej5Diu',

    'log' => [
        'level' => 'debug',
        'file' => __DIR__ . '/log/' . date('Y-m-d') . '.log',
    ],
    'guzzle' => [
        'timeout' => 3.0, // 超时时间（秒）
        'verify' => false, // 关掉 SSL 认证（强烈不建议！！！）
    ],

];

$app = new Application($options);

$menu = $app->menu;
//var_dump($menu->current());
var_dump($menu->all());
//var_dump($menu->destroy());

$buttons = [
    [
        "type" => "view",
        "name" => "行行享问",
        "url"  => "http://weixin.ihanghang.com/index.php?s=/Home/Share/index.html"
    ]
];
$r = $menu->add($buttons);

var_dump($r);
